<?php
/**
 * RAI错误封装类
 *
 * @version $Id: RaiFault.php 312 2008-04-23 16:29:38Z iwind $
 * @package net.4kiki.rai.server
 * @since 0.0.3
 */
class RaiFault {
	private $code = 0;
	private $message;
	
	/**
	 * 构造器
	 *
	 * code:
	 * - 5000~5099 validation failed 
	 * 
	 * @param integer $code 代码
	 * @param string $message 消息
	 */
	public function __construct($code = 0, $message = null) {
		$this->code = $code;
		$this->message = $message;
	}
	
	/**
	 * 设置代码
	 *
	 * @param integer $code 代码
	 */
	public function setCode($code) {
		$this->code = $code;
	}
	
	/**
	 * 设置消息
	 *
	 * @param string $message 消息
	 */
	public function setMessage($message) {
		$this->message = $message;
	}
	
	/**
	 * 取得代码
	 *
	 * @return integer
	 */
	public function getCode() {
		return $this->code;
	}
	
	/**
	 * 取得消息
	 *
	 * @return string
	 */
	public function getMessage() {
		return $this->message;
	}
}

?>